# 用来生成接豆浆位置的脚本

import math
# 中间的角度
center_angle = 30.0

# 杯子距离
cup_range = 70.0

# 杯子离原点距离
cup_center_range = 280.0

# 伸缩距离
forward_len = 80.0

# 相对中间的角度
delta_angle = math.degrees(math.tanh(cup_range / cup_center_range))
print(delta_angle)

# 左右两边杯子线长度
right_left_len = math.sqrt(math.pow(cup_range, 2) + math.pow(cup_center_range, 2))
print(right_left_len)

angle = center_angle - delta_angle


# 中间长短
x = cup_center_range * math.cos(math.radians(center_angle))
y = cup_center_range * math.sin(math.radians(center_angle))
print("中长 x = {}, y = {}".format(x, y))

x = (cup_center_range - forward_len) * math.cos(math.radians(center_angle))
y = (cup_center_range - forward_len) * math.sin(math.radians(center_angle))
print("中短 x = {}, y = {}".format(x, y))




x = right_left_len * math.cos(math.radians(center_angle - delta_angle))
y = right_left_len * math.sin(math.radians(center_angle - delta_angle))
print("左长 x = {}, y = {}".format(x, y))

x = (right_left_len - forward_len) * math.cos(math.radians(center_angle - delta_angle))
y = (right_left_len - forward_len) * math.sin(math.radians(center_angle - delta_angle))
print("左短 x = {}, y = {}".format(x, y))



x = right_left_len * math.cos(math.radians(center_angle + delta_angle))
y = right_left_len * math.sin(math.radians(center_angle + delta_angle))
print("右长 x = {}, y = {}".format(x, y))

x = (right_left_len - forward_len) * math.cos(math.radians(center_angle + delta_angle))
y = (right_left_len - forward_len) * math.sin(math.radians(center_angle + delta_angle))
print("右短 x = {}, y = {}".format(x, y))